﻿using System;
using System.IO;
using System.Web;

/// <summary>
///LOG 的摘要说明
/// </summary>
public class LOG
{
	public LOG()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}

    static public void writer(string msg)
    {
        string flName = HttpContext.Current.Request.PhysicalApplicationPath + "log//" + DateTime.Today.Date.ToLongDateString() + ".txt";
        try
        {
            StreamWriter sw = new StreamWriter(flName, true, System.Text.Encoding.Default, 1024);
            sw.WriteLine(DateTime.Now.Minute + ":min " + DateTime.Now.Second + ":sec : " + msg);
            sw.Close();
        }
        catch (Exception ex)
        {
            LOG.writer(ex.ToString());
        };
    }
}